home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / netmail / rnr214.zip / RNR.PAS < prev    next >
Pascal/Delphi Source File  |  1996-04-09  |  6KB  |  204 lines

  1. program rnr;  {russell's news reader/poster, rest and relaxation}
  2.               {formerly `rusnews'}
  3.  
  4. {
  5.  
  6. Russell_Schulz@locutus.ofB.ORG (960409)
  7.  
  8. }
  9.  
  10. {
  11.  
  12. KNOWN SHORTCOMINGS (but don't let them scare you away - they're pessimistic)
  13.  
  14. (see also rnr.fut for future considerations)
  15.  
  16. does not use the b-tree index for Waffle 1.65's password file for higher speed
  17. will use the first rnews.exe and rmail.exe (or whatever commands are
  18.   configured) found in the current directory+path - be careful with the
  19.   directory from which you run this -- for sure not the user's home dir!
  20. crossposts detected/filtered using at most 200 groups in join file
  21.   smaller-memory version: 120 groups used in detection
  22. very limited kill/antikill files
  23.   no regular expression searches
  24.   at most 150 killed/antikilled items/group
  25.     smaller-memory version: 50 killed/antikilled items/group
  26. threading doesn't use References: data as much as it could - but
  27.   it hashes them for much smaller space requirements now, so it should
  28.   be fine except in the case of hash collisions - perfect detection of
  29.   references sacrificed for space savings
  30. doesn't log outgoing mail in ~waffle/admin/mail
  31. doesn't guess when daylight savings hits
  32.   (you have to change the clock on your pc anyway, and the policy about
  33.   when to switch is different around the world)
  34. has no simple built-in editor
  35. does not use waffle's editor information from STATUS command or _editors file
  36. has no good way to send time limit information to editor program
  37. only understands %A, %W, %n, %u, %F, %i, %_ waffle parameters (and fake %f)
  38.   (for static netmail:/netnews:/replyto: entries)
  39. to get around waffle's rnews.exe continuation line noncompliance it doesn't
  40.   keep lines to 80 columns (in the References: line)
  41. any outgoing line more than 255 chars will be truncated somewhere still
  42.   (but it won't try to send them, since it warns you)
  43.  
  44. KNOWN WEIRDNESS
  45.  
  46. 'r'eply and 'f'ollow make you be careful with sig
  47.   (but it works)
  48.     (except with very long posts if you have a lousy editor)
  49.   (this helps prevent double sig enclosure, for sure!)
  50. 'P'revious group sometimes does nothing (in case where all articles
  51.   in the previous group are already read)
  52. leaves files laying around in temporary directory - could be handy, since
  53.   sometimes rnews fails without an errorlevel, but could also get in your
  54.   way - you may want to delete them periodically (although they'll be
  55.   overwritten with the next mail or followup)
  56.  
  57. ENVIRONMENT VARIABLES
  58.  
  59. WAFFLE - same as waffle requires it - full pathname of static file
  60.   if not there, uses `static' in current directory
  61. NET_NAME or USER or LOGNAME - user's waffle user id
  62.   also -u/--user
  63. EDITOR - editor (default: vi)
  64.   also -e/--editor - see also -o/--editor-options
  65.   full path and extension are optional
  66. TZ - time zone; default: `-0700' (if not found in static file)
  67. FULLNAME - full real-world name of user
  68.   also -f/--fullname (underscores changed to spaces)
  69.   should not be necessary for Waffle 1.64 and 1.65 or uupc or uufree
  70. WAFFLEVERSION - version of waffle; default: `1.64'
  71.   also static entry: version; also -v/--interface-version
  72.  
  73.  
  74. CREDITS
  75.  
  76. Kim Storm, for the `nn' newsreader (a much more powerful newsreader
  77.   for Unix, some of whose keystrokes were used here (not Unix, nn))
  78.  
  79. Bill Fenner, author of PWPL165.ZIP from simtel20, who allowed me
  80.   to know what was where in the 1.65 password file with no guessing
  81.  
  82. Rhys Weatherley, who suggested hashing the Message-ID: and References:
  83.   lines for better threading accuracy without taking much space
  84.  
  85. Henrik Storner, who did all of the UUPC work and found various errors
  86.  
  87. }
  88.  
  89. {create a .TPM file for tp4}
  90.  
  91. {$ifdef VER40}
  92. {$T+} 
  93. {$endif}
  94.  
  95. {$I rnr-def.pas}
  96.  
  97. { the last number (max-heap) being 640k means that you MUST swap! }
  98. { (unless you recompile with a lower value, of course) }
  99.  
  100. {$ifdef tiny}
  101. {$M 24576,0,655360}
  102. {$else}
  103. {$M 47104,0,655360}
  104. {$endif}
  105.  
  106. uses rnrglob,rnrconf,rnrio,rnrfunc,rnrproc,rnrinit,rnrmain,rnrselb
  107.  
  108. {$ifdef timeout}
  109.  
  110. ,rnrtime
  111.  
  112. {$endif}
  113.  
  114. ;
  115.  
  116.  
  117.  
  118. begin
  119.  
  120.   initialize;
  121.  
  122. {$ifdef debug}
  123.   execp('c:\usr\bin\freem.exe','');
  124.   xwrites(newsreadername);
  125.   xwrites(': freem: execresult=');
  126.   xwritei(execresult);
  127.   xwriteln;
  128. {$endif}
  129.  
  130.   repeat
  131.  
  132.     if not needtofindnextgroup then
  133.       needtofindnextgroup := true
  134.     else
  135.       begin
  136.         currsource := getnextgroup;
  137.         currsourcekind := sourcegroup;
  138.       end;
  139.  
  140.     if currsource<>'' then
  141.       begin
  142.  
  143.         if clearscreenbetweengroups then
  144.           xclrscr;
  145.  
  146.         xwritelnss('source: ',currsource);
  147.  
  148.         groupinit;
  149.         if currdir<>'' then
  150.           begin
  151.             alreadyread := highestreadin(currsource,currsourcekind);
  152.  
  153. {make life easier for mouse users}
  154.             xwritelns('Reading...  (or use ! Q N O)');
  155.  
  156.             readinarts;
  157.             if not nextwhilereading then
  158.               begin
  159.  
  160. {all these routines handle numarts=0 just fine - but it cuts down on output}
  161.                 if numarts>0 then
  162.                   begin
  163.                     if numarts>1 then
  164.                       begin
  165.                         xwrites('Sorting ');
  166.                         xwritei(numarts);
  167.                         xwrites(' articles...');
  168.                       end;
  169.                     sortitall;
  170.  
  171.                     if unscannedarts then
  172.                       warn('not all articles read in!');
  173.  
  174. {$ifdef testsort}
  175. {$ifdef pauseintestsort}
  176.                     if showdebug('sort') then
  177.                       begin
  178.                         xwrites('pausing...');
  179.                         xwritelns(xreadkey);
  180.                       end;
  181. {$endif}
  182. {$endif}
  183.  
  184.               {
  185.                     for i := 1 to numarts do
  186.                       writeln(articles[i]^.filename:14,' ',
  187.                        articles[i]^.date div 16384:4,' ',
  188.                        (articles[i]^.date mod 16384) div 1024:2,' ',
  189.                        (articles[i]^.date mod 1024) div 32:2,' ',
  190.                        articles[i]^.date mod 32:2,' ',
  191.                        articles[i]^.indents:3,' ',
  192.                        copy(articles[i]^.basesubject,1,50));
  193.               }
  194.  
  195.                     selectandbrowse;
  196.                     updatejoin(highestread);
  197.                   end;
  198.               end;
  199.           end;
  200.       end;
  201.   until currsource='';
  202.  
  203.   shutdown(0);
  204. end.